package com.shoppingmall.mapper;

import com.shoppingmall.model.Orders;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface OrdersMapper {
    @Insert("insert into tbl_order values (#{order_id},#{user_id},#{order_to_name},#{order_to_address},#{order_to_phone},#{order_time},0,#{order_total_price})")
    void addOrder(Orders orders);

    List<Orders> getOrders(int user_id);

    List<Orders> getOrderById(String order_to);
}
